package calculator;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigDecimal;

import exceptions.InvalidExpressionException;

/* EikonaCalculator.java
* Author: Ben McCormick
* Written: May 15 2011
* Last Edited: May 16 2011
* Ben McCormick 2011
* This file is part of The Eikona Project .
*    Copyright 2011 Ben McCormick
*    Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*    
*    http://www.apache.org/licenses/LICENSE-2.0
*    
*     Unless required by applicable law or agreed to in writing, software
*     distributed under the License is distributed on an "AS IS" BASIS,
*     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*     See the License for the specific language governing permissions and
*     limitations under the License.
*/



public interface EikonaCalculator {
	
	
	public static final int RADIANS = 1;
	public static final int DEGREES = 2;

	/***
	 * Computes a value given an expression
	 * @throws FileNotFoundException 
	 * @throws IOException 
	 * @throws Exception 
	 */
	public abstract BigDecimal compute(String s) throws InvalidExpressionException, NumberFormatException, InvalidExpressionException, IOException;

	
	/***
	 * adds a variable and its value in the MathEvaluator
	 */
	public abstract void addVariable(String v, BigDecimal val);


	/***
	 * gets the variable's value that was assigned previously 
	 */
	public abstract BigDecimal getVariable(String s);

	/**
	 * Get the angleUnits (Radians, Degrees)
	 * @return the angle
	 */
	public abstract int getAngleUnits();
	
	/** Sets the angle units (Radians, Degrees) */
	public abstract void setAngleUnits(int units);

}
